<template>
    <div id="app">
      <el-form ref="add-saleChance" :model="saleChance" label-width="100px">
        <el-form-item label="销售机会名称">
          <el-input v-model="saleChance.name" placeholder="请输入名称"></el-input>
        </el-form-item>
        <el-form-item label="描述">
          <el-input v-model="saleChance.description"  type="textarea" rows="5"></el-input>
        </el-form-item>

        <el-form-item label="消息来源">
          <el-input v-model="saleChance.messageFrom"></el-input>
        </el-form-item>
        <el-form-item label="联系人">
          <el-input v-model="saleChance.linkman"></el-input>
        </el-form-item>
        <el-form-item label="电话">
          <el-input v-model="saleChance.tel"></el-input>
        </el-form-item>

        <el-form-item>
          <el-button type="primary" @click="saveSaleChance()">提交</el-button>
        </el-form-item>
      </el-form>
    </div>
</template>

<script>
    export default {
      data(){
        return {
          saleChance:{}
        }
      },
      methods:{
        saveSaleChance(){
          //发出ajax请求
          this.axios.post("/saleChance/add",this.saleChance).then((resp)=>{
            this.$router.push("/saleChance/SaleChanceList");
          })
        }
      }
    }
</script>


<style scoped>

</style>
